package TestLayer;

import static org.junit.Assert.*;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import ModelLayer.Salesman;
import DBLayer.DBSalesman;
import CTRLayer.SalesmanCTR;

public class SalesmanCTRTest 
{
	private SalesmanCTR salesmanCTR;
	@Before
	public void setUp() throws Exception 
	{
		salesmanCTR = new SalesmanCTR();
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
//	public void testGetSalesman() 
//	{
//		Salesman salesman = salesmanCTR.getSalesman("1234567890", true);
//		System.out.println("salesman name: " + salesman.getName());
//		System.out.println("Printing out sales: ");
//		for(int i = 0; i < salesman.getSales().size(); i++)
//		{
//			System.out.println(salesman.getSales().get(i).getOrderNO());
//		}
//	}
//	
	public void testInsertSalesman()
	{
		salesmanCTR.insertSalesman("Rasmus Andersen Borup", "111111-1111", "12345678", "Rasmus@eksempel.dk", "Rasmusvej 1", "9000", "1234567890", "10%");
		salesmanCTR.insertSalesman("Anders Andersen", "221222-2221", "11223344", "Anders@eksempel.dk", "Andersvej 1", "9000", "1122334455", "5%");		
	}
}
